package com.rpc.dubbo.consumer;


import com.rpc.dubbo.netty.NettyClient;
import com.rpc.dubbo.publicService.HelloService;

/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class ClientBootStrap {



  public static void main(String[] args) throws InterruptedException {
    //创建一个消费者
    NettyClient customer = new NettyClient();
    //创建代理对象
    HelloService service = (HelloService) customer.getBean(HelloService.class);

    //通过代理对象调用服务提供者的方法
    String res = service.hello("你好 Dubbo");
    System.out.println("调用的结果，res = " + res);
    Thread.sleep(2000);
  }
}

